#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>

typedef int HTDataType;
#define InitSize 4

typedef struct HeapNode
{
	HTDataType* a;
	int size;
	int capacity;
}HP;

void HeapInit(HP* php);
void HeapDestroy(HP* php);
void HeapPush(HP* php, HTDataType x);
void AdjustUp(HTDataType* a, int child);
void HeapPop(HP* php);
HTDataType HeapTop(HP* php);
int HeapSize(HP* php);
bool HeapEmpty(HP* php);
